﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="cancel_my_course.aspx.cs" Inherits="cancel_my_course" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <center>
        <asp:GridView ID="GridView1" runat="server" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Cno" HeaderText="学号" SortExpression="Cno" />
                <asp:BoundField DataField="Cname" HeaderText="课程名" SortExpression="Cname" />
                <asp:BoundField DataField="teacher" HeaderText="教师名" SortExpression="teacher" />
                <asp:BoundField DataField="address" HeaderText="上课地点" SortExpression="address" />
                <asp:BoundField DataField="time" HeaderText="上课时间" SortExpression="time" />
                <asp:HyperLinkField DataNavigateUrlFields="Cno,Cname" DataNavigateUrlFormatString="cancel_my_course_detail.aspx?Cno={0}&amp;Cname={1}" HeaderText="退课" Text="退课" Target="_parent" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
            </center>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="select Select_course.Cno,Course.Cname,Course.teacher,Course.address,Course.time
from Select_course,Course
where Select_course.Cno=Course.Cno and Select_course.Sno=@Sno">
            <SelectParameters>
                <asp:SessionParameter Name="Sno" SessionField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
